#ifndef FILEIMAGE_H
#define FILEIMAGE_H

#include "image_save.h"
#include "image_constants.h"
#include <QQueue>

class FileImage : public ImageSave
{
public:
    explicit FileImage();
    ~FileImage() override;

    int setImageBits(unsigned char bits) override;
    unsigned char getImageBits() const override;

    int setImageSavePosition(unsigned char mode) override;
    unsigned char getImageSavePosition() const override;

    int imageSave(const unsigned char *image_pointer) override;
    int setImageAuxiliaryInformation(QByteArray image_message) override;
private:
    //添加图像附加信息
    int addAdditionalImageInformation();
    //选择图像保存位置并保存
    int selectImageSaveLocation(QImage image_data, QString image_name);
    int selectImageSaveLocation(QByteArray image_data, QString image_name);

private:
    //标志位

    //图像保存位数
    unsigned char image_bits_ = TwelveBit;
    //图像保存模式
    unsigned char image_save_position_ = InternalStorage;

private:
    //图像附加信息队列
    QQueue<QByteArray> image_auxiliary_data_queue_;
    //图像数据队列
    QQueue<QByteArray> image_data_queue_;
};

#endif // FILEIMAGE_H
